    Ext.define('HIT.view.SetRepasswordPanel', {
    extend: 'Ext.form.Panel',
    alias: 'widget.setrepasswordpanel',

    height:150,
    width:600,
    overlapHeader: false,
    preventHeader: true,
    title: Share.T('修改密码'),
    
  
    
    initComponent: function() {
        var me = this;
        this.title = Share.T('修改密码');

        Ext.apply(Ext.form.VTypes, {//确认密码
   	     confirmpsw : function(val, field) {
   	                     if (field.confirmTo) {
   	                        var pwd = Ext.getCmp(field.confirmTo);
       	                    return (val == pwd.getValue());
   	                      }
   	                     return true;
                      	 }
        });
        
        Ext.applyIf(me, {
             items: [									
                        {
                            xtype: 'textfield',
                            anchor: '100%',
                            fieldLabel: Share.T('原始密码'),
			                id: 'repassword-origin',
                            inputType: 'password',
			                margin: '20 50 20',
		                    width: 300,
		                    allowBlank:false,
                            blankText:Share.T('请输入原始密码'),
                            msgTarget  : 'side'
                        },
                        {
                            xtype: 'textfield',
                            anchor: '100%',
                            id:'repassword-new',
                            inputType: 'password',
                            fieldLabel: Share.T('新密码'),
                            allowBlank:false,
                            blankText:Share.T('请输入新密码'),
                            msgTarget  : 'side',
                            margin: '20 50 20',
		                    width: 300
                        },
                        {
                            xtype: 'textfield',
                            anchor: '100%',
                            id:'repassword-confirm',
                            inputType: 'password',
                            vtype:'confirmpsw',
                            vtypeText:Share.T("两次密码不一致！"),
                            msgTarget  : 'side',
                            confirmTo:"repassword-new",
                            fieldLabel: Share.T('确认新密码'),
                            allowBlank:false,
                            blankText:Share.T('确认密码不能为空'),
                            margin: '20 50 20',
		                    width: 300
                        }
                      ]   
         });
        me.callParent(arguments);
    }

});